//
//  ComposeTextView.swift
//  JMWB
//
//  Created by 个人电脑 on 16/3/24.
//  Copyright © 2016年 个人电脑. All rights reserved.
//

import UIKit
import SnapKit

class ComposeTextView: UITextView {

     lazy var placeHolderLabel : UILabel = UILabel()
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        setupUI()
    }

}
extension ComposeTextView {

    private func setupUI(){
    
        addSubview(placeHolderLabel)
        
        placeHolderLabel.snp_makeConstraints { (make) -> Void in
            make.top.equalTo(8)
            make.leading.equalTo(10)
        }
        placeHolderLabel.font = font
        placeHolderLabel.textColor = UIColor.lightGrayColor()
        placeHolderLabel.text = "分享新鲜事..."
        
        //内容容器内边距
        self.textContainerInset = UIEdgeInsets(top: 8, left: 7, bottom: 0, right: 7)
    }
}